﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using Sherwood.Configuration;

namespace Sherwood.Content.Tasks
{
    public class StartTaskExecutionAgent : IXmlConfigurable
    {
        private static readonly List<TaskExecutionAgent> instances = new List<TaskExecutionAgent>();

        public static List<TaskExecutionAgent> Instances
        {
            get { return instances; }
        }

        public void Configure(XmlReader config)
        {
            var agent = DependencyInjection.Resolve<TaskExecutionAgent>();
            instances.Add(agent);
            agent.Start();
        }
    }
}
